/* 
 * File:   alsa.h
 * Author: ufk
 *
 * Created on March 23, 2014, 10:50 PM
 */

#ifndef ALSA_H
#define	ALSA_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <alsa/asoundlib.h>
#include <alsa/pcm.h>
#include <glib-2.0/glib.h>
    
struct alsa_device;
typedef struct alsa_device alsa_device;    
    
void alsa_get_capture_device_list(alsa_device *devices, gsize *devices_cnt);
void alsa_get_playback_device_list(alsa_device *devices, gsize *devices_cnt);
void alsa_get_device_list(snd_pcm_stream_t stream,alsa_device *devices, gsize *devices_cnt);
void alsa_get_hardware_string(char *resultstr,struct alsa_device *alsa_dev, guint8 position);
char *alsa_get_hardware_desc(alsa_device *alsa_dev, guint8 position);
gboolean alsa_get_hardware_is_available(struct alsa_device *alsa_dev,guint8 position);
char *alsa_get_hardware_string_allocated(struct alsa_device *alsa_dev, guint8 position);
char *alsa_get_hardware_desc_alocated(struct alsa_device *alsa_dev, guint8 position);
void pcm_list(void);
alsa_device *create_alsa_array(size_t n);

#ifdef	__cplusplus
}
#endif

#endif	/* ALSA_H */

